/***********************************************************
  Copyright (C), 2015, Water's Space
  File name:    lib_math.h
  Author:       Water (sszhouplus@qq.com)
  Version:      0.1
  Date:         2015-02-02
  Description:  Math Lib Header File for Audio Used
  OpenSource:   https://git.oschina.net/webwater/AudioKits.git
  History:
    1. Date:    2015-02-02
       Author:  Water (sszhouplus@qq.com)
       Modification: Create
***********************************************************/

#ifndef __LIB_MATH__H__
#define __LIB_MATH__H__


#ifdef __cplusplus
extern "C" {
#endif


/**
  * Function:   lib_sin
  * @brief:     audio used sin lib function, fixed point
  * @param:
  *             phase: fixed point, 2*pi = 2^22 = 0x400000
  *                    ex. pi/4 = 0x80000
  * @return:
  *             return sin(phase) fixed point value Q1.31
  * Others:
  */
long lib_sin(long phase);


/**
  * Function:   lib_sin_lite
  * @brief:     audio used sin lib function lite version, fixed point
  * @param:
  *             phase: unsigned value, fixed point, 2*pi = 2^10 = 0x400
  *                    ex. pi/4 = 0x80
  * @return:
  *             return sin(phase) fixed point value Q1.31
  * Others:
  */
long lib_sin_lite(unsigned long phase);





#ifdef __cplusplus
}
#endif

#endif // #ifndef __LIB_MATH__H__


